Integrand size = 23, antiderivative size = 281 \[ \int \frac {\csc ^2(c+d x)}{a+b \sin ^3(c+d x)} \, dx=-\frac {2 (-1)^{2/3} b^{2/3} \arctan \left (\frac {\sqrt [3]{-1} \sqrt [3]{b}-\sqrt [3]{a} \tan \left (\frac {1}{2} (c+d x)\right )}{\sqrt {a^{2/3}-(-1)^{2/3} b^{2/3}}}\right )}{3 a^{4/3} \sqrt {a^{2/3}-(-1)^{2/3} b^{2/3}} d}+\frac {2 b^{2/3} \arctan \left (\frac {\sqrt [3]{b}+\sqrt [3]{a} \tan \left (\frac {1}{2} (c+d x)\right )}{\sqrt {a^{2/3}-b^{2/3}}}\right )}{3 a^{4/3} \sqrt {a^{2/3}-b^{2/3}} d}-\frac {2 \sqrt [3]{-1} b^{2/3} \arctan \left (\frac {(-1)^{2/3} \sqrt [3]{b}+\sqrt [3]{a} \tan \left (\frac {1}{2} (c+d x)\right )}{\sqrt {a^{2/3}+\sqrt [3]{-1} b^{2/3}}}\right )}{3 a^{4/3} \sqrt {a^{2/3}+\sqrt [3]{-1} b^{2/3}} d}-\frac {\cot (c+d x)}{a d} \]
[Out]
Time = 0.25 (sec) , antiderivative size = 281, normalized size of antiderivative = 1.00, number of steps used = 15, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.261, Rules used = {3299, 3852, 8, 2739, 632, 210} \[ \int \frac {\csc ^2(c+d x)}{a+b \sin ^3(c+d x)} \, dx=-\frac {2 (-1)^{2/3} b^{2/3} \arctan \left (\frac {\sqrt [3]{-1} \sqrt [3]{b}-\sqrt [3]{a} \tan \left (\frac {1}{2} (c+d x)\right )}{\sqrt {a^{2/3}-(-1)^{2/3} b^{2/3}}}\right )}{3 a^{4/3} d \sqrt {a^{2/3}-(-1)^{2/3} b^{2/3}}}+\frac {2 b^{2/3} \arctan \left (\frac {\sqrt [3]{a} \tan \left (\frac {1}{2} (c+d x)\right )+\sqrt [3]{b}}{\sqrt {a^{2/3}-b^{2/3}}}\right )}{3 a^{4/3} d \sqrt {a^{2/3}-b^{2/3}}}-\frac {2 \sqrt [3]{-1} b^{2/3} \arctan \left (\frac {\sqrt [3]{a} \tan \left (\frac {1}{2} (c+d x)\right )+(-1)^{2/3} \sqrt [3]{b}}{\sqrt {a^{2/3}+\sqrt [3]{-1} b^{2/3}}}\right )}{3 a^{4/3} d \sqrt {a^{2/3}+\sqrt [3]{-1} b^{2/3}}}-\frac {\cot (c+d x)}{a d} \]
[In]
[Out]
Rule 8
Rule 210
Rule 632
Rule 2739
Rule 3299
Rule 3852
Rubi steps \begin{align*} \text {integral}& = \int \left (\frac {\csc ^2(c+d x)}{a}-\frac {b \sin (c+d x)}{a \left (a+b \sin ^3(c+d x)\right )}\right ) \, dx \\ & = \frac {\int \csc ^2(c+d x) \, dx}{a}-\frac {b \int \frac {\sin (c+d x)}{a+b \sin ^3(c+d x)} \, dx}{a} \\ & = -\frac {b \int \left (-\frac {1}{3 \sqrt [3]{a} \sqrt [3]{b} \left (\sqrt [3]{a}+\sqrt [3]{b} \sin (c+d x)\right )}-\frac {(-1)^{2/3}}{3 \sqrt [3]{a} \sqrt [3]{b} \left (\sqrt [3]{a}-\sqrt [3]{-1} \sqrt [3]{b} \sin (c+d x)\right )}+\frac {\sqrt [3]{-1}}{3 \sqrt [3]{a} \sqrt [3]{b} \left (\sqrt [3]{a}+(-1)^{2/3} \sqrt [3]{b} \sin (c+d x)\right )}\right ) \, dx}{a}-\frac {\text {Subst}(\int 1 \, dx,x,\cot (c+d x))}{a d} \\ & = -\frac {\cot (c+d x)}{a d}+\frac {b^{2/3} \int \frac {1}{\sqrt [3]{a}+\sqrt [3]{b} \sin (c+d x)} \, dx}{3 a^{4/3}}-\frac {\left (\sqrt [3]{-1} b^{2/3}\right ) \int \frac {1}{\sqrt [3]{a}+(-1)^{2/3} \sqrt [3]{b} \sin (c+d x)} \, dx}{3 a^{4/3}}+\frac {\left ((-1)^{2/3} b^{2/3}\right ) \int \frac {1}{\sqrt [3]{a}-\sqrt [3]{-1} \sqrt [3]{b} \sin (c+d x)} \, dx}{3 a^{4/3}} \\ & = -\frac {\cot (c+d x)}{a d}+\frac {\left (2 b^{2/3}\right ) \text {Subst}\left (\int \frac {1}{\sqrt [3]{a}+2 \sqrt [3]{b} x+\sqrt [3]{a} x^2} \, dx,x,\tan \left (\frac {1}{2} (c+d x)\right )\right )}{3 a^{4/3} d}-\frac {\left (2 \sqrt [3]{-1} b^{2/3}\right ) \text {Subst}\left (\int \frac {1}{\sqrt [3]{a}+2 (-1)^{2/3} \sqrt [3]{b} x+\sqrt [3]{a} x^2} \, dx,x,\tan \left (\frac {1}{2} (c+d x)\right )\right )}{3 a^{4/3} d}+\frac {\left (2 (-1)^{2/3} b^{2/3}\right ) \text {Subst}\left (\int \frac {1}{\sqrt [3]{a}-2 \sqrt [3]{-1} \sqrt [3]{b} x+\sqrt [3]{a} x^2} \, dx,x,\tan \left (\frac {1}{2} (c+d x)\right )\right )}{3 a^{4/3} d} \\ & = -\frac {\cot (c+d x)}{a d}-\frac {\left (4 b^{2/3}\right ) \text {Subst}\left (\int \frac {1}{-4 \left (a^{2/3}-b^{2/3}\right )-x^2} \, dx,x,2 \sqrt [3]{b}+2 \sqrt [3]{a} \tan \left (\frac {1}{2} (c+d x)\right )\right )}{3 a^{4/3} d}+\frac {\left (4 \sqrt [3]{-1} b^{2/3}\right ) \text {Subst}\left (\int \frac {1}{-4 \left (a^{2/3}+\sqrt [3]{-1} b^{2/3}\right )-x^2} \, dx,x,2 (-1)^{2/3} \sqrt [3]{b}+2 \sqrt [3]{a} \tan \left (\frac {1}{2} (c+d x)\right )\right )}{3 a^{4/3} d}-\frac {\left (4 (-1)^{2/3} b^{2/3}\right ) \text {Subst}\left (\int \frac {1}{-4 \left (a^{2/3}-(-1)^{2/3} b^{2/3}\right )-x^2} \, dx,x,-2 \sqrt [3]{-1} \sqrt [3]{b}+2 \sqrt [3]{a} \tan \left (\frac {1}{2} (c+d x)\right )\right )}{3 a^{4/3} d} \\ & = -\frac {2 (-1)^{2/3} b^{2/3} \arctan \left (\frac {\sqrt [3]{-1} \sqrt [3]{b}-\sqrt [3]{a} \tan \left (\frac {1}{2} (c+d x)\right )}{\sqrt {a^{2/3}-(-1)^{2/3} b^{2/3}}}\right )}{3 a^{4/3} \sqrt {a^{2/3}-(-1)^{2/3} b^{2/3}} d}+\frac {2 b^{2/3} \arctan \left (\frac {\sqrt [3]{b}+\sqrt [3]{a} \tan \left (\frac {1}{2} (c+d x)\right )}{\sqrt {a^{2/3}-b^{2/3}}}\right )}{3 a^{4/3} \sqrt {a^{2/3}-b^{2/3}} d}-\frac {2 \sqrt [3]{-1} b^{2/3} \arctan \left (\frac {(-1)^{2/3} \sqrt [3]{b}+\sqrt [3]{a} \tan \left (\frac {1}{2} (c+d x)\right )}{\sqrt {a^{2/3}+\sqrt [3]{-1} b^{2/3}}}\right )}{3 a^{4/3} \sqrt {a^{2/3}+\sqrt [3]{-1} b^{2/3}} d}-\frac {\cot (c+d x)}{a d} \\ \end{align*}
Result contains higher order function than in optimal. Order 9 vs. order 3 in optimal.
Time = 0.37 (sec) , antiderivative size = 196, normalized size of antiderivative = 0.70 \[ \int \frac {\csc ^2(c+d x)}{a+b \sin ^3(c+d x)} \, dx=\frac {-3 \cot \left (\frac {1}{2} (c+d x)\right )+2 b \text {RootSum}\left [-b+3 b \text {$\#$1}^2-8 i a \text {$\#$1}^3-3 b \text {$\#$1}^4+b \text {$\#$1}^6\&,\frac {-2 \arctan \left (\frac {\sin (c+d x)}{\cos (c+d x)-\text {$\#$1}}\right )+i \log \left (1-2 \cos (c+d x) \text {$\#$1}+\text {$\#$1}^2\right )+2 \arctan \left (\frac {\sin (c+d x)}{\cos (c+d x)-\text {$\#$1}}\right ) \text {$\#$1}^2-i \log \left (1-2 \cos (c+d x) \text {$\#$1}+\text {$\#$1}^2\right ) \text {$\#$1}^2}{b-4 i a \text {$\#$1}-2 b \text {$\#$1}^2+b \text {$\#$1}^4}\&\right ]+3 \tan \left (\frac {1}{2} (c+d x)\right )}{6 a d} \]
[In]
[Out]
Result contains higher order function than in optimal. Order 9 vs. order 3.
Time = 1.15 (sec) , antiderivative size = 114, normalized size of antiderivative = 0.41
method | result | size |
derivativedivides | \(\frac {\frac {\tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{2 a}-\frac {2 b \left (\munderset {\textit {\_R} =\operatorname {RootOf}\left (a \,\textit {\_Z}^{6}+3 a \,\textit {\_Z}^{4}+8 b \,\textit {\_Z}^{3}+3 a \,\textit {\_Z}^{2}+a \right )}{\sum }\frac {\left (\textit {\_R}^{3}+\textit {\_R} \right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-\textit {\_R} \right )}{\textit {\_R}^{5} a +2 \textit {\_R}^{3} a +4 \textit {\_R}^{2} b +\textit {\_R} a}\right )}{3 a}-\frac {1}{2 a \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}}{d}\) | \(114\) |
default | \(\frac {\frac {\tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{2 a}-\frac {2 b \left (\munderset {\textit {\_R} =\operatorname {RootOf}\left (a \,\textit {\_Z}^{6}+3 a \,\textit {\_Z}^{4}+8 b \,\textit {\_Z}^{3}+3 a \,\textit {\_Z}^{2}+a \right )}{\sum }\frac {\left (\textit {\_R}^{3}+\textit {\_R} \right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-\textit {\_R} \right )}{\textit {\_R}^{5} a +2 \textit {\_R}^{3} a +4 \textit {\_R}^{2} b +\textit {\_R} a}\right )}{3 a}-\frac {1}{2 a \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}}{d}\) | \(114\) |
risch | \(-\frac {2 i}{a d \left ({\mathrm e}^{2 i \left (d x +c \right )}-1\right )}-4 \left (\munderset {\textit {\_R} =\operatorname {RootOf}\left (\left (2985984 a^{10} d^{6}-2985984 a^{8} b^{2} d^{6}\right ) \textit {\_Z}^{6}+62208 a^{6} b^{2} d^{4} \textit {\_Z}^{4}+b^{4}\right )}{\sum }\textit {\_R} \ln \left ({\mathrm e}^{i \left (d x +c \right )}+\left (\frac {248832 d^{5} a^{10}}{a^{2} b^{3}+b^{5}}-\frac {248832 d^{5} a^{8} b^{2}}{a^{2} b^{3}+b^{5}}\right ) \textit {\_R}^{5}+\left (\frac {20736 i d^{4} a^{9}}{a^{2} b^{3}+b^{5}}-\frac {20736 i d^{4} a^{7} b^{2}}{a^{2} b^{3}+b^{5}}\right ) \textit {\_R}^{4}+\left (\frac {3456 d^{3} a^{6} b^{2}}{a^{2} b^{3}+b^{5}}+\frac {1728 d^{3} b^{4} a^{4}}{a^{2} b^{3}+b^{5}}\right ) \textit {\_R}^{3}+\left (\frac {288 i d^{2} a^{5} b^{2}}{a^{2} b^{3}+b^{5}}+\frac {144 i d^{2} b^{4} a^{3}}{a^{2} b^{3}+b^{5}}\right ) \textit {\_R}^{2}+\left (-\frac {12 d \,a^{4} b^{2}}{a^{2} b^{3}+b^{5}}-\frac {24 d \,b^{4} a^{2}}{a^{2} b^{3}+b^{5}}\right ) \textit {\_R} -\frac {i b^{4} a}{a^{2} b^{3}+b^{5}}\right )\right )\) | \(362\) |
[In]
[Out]
Result contains complex when optimal does not.
Time = 1.34 (sec) , antiderivative size = 21243, normalized size of antiderivative = 75.60 \[ \int \frac {\csc ^2(c+d x)}{a+b \sin ^3(c+d x)} \, dx=\text {Too large to display} \]
[In]
[Out]
\[ \int \frac {\csc ^2(c+d x)}{a+b \sin ^3(c+d x)} \, dx=\int \frac {\csc ^{2}{\left (c + d x \right )}}{a + b \sin ^{3}{\left (c + d x \right )}}\, dx \]
[In]
[Out]
\[ \int \frac {\csc ^2(c+d x)}{a+b \sin ^3(c+d x)} \, dx=\int { \frac {\csc \left (d x + c\right )^{2}}{b \sin \left (d x + c\right )^{3} + a} \,d x } \]
[In]
[Out]
\[ \int \frac {\csc ^2(c+d x)}{a+b \sin ^3(c+d x)} \, dx=\int { \frac {\csc \left (d x + c\right )^{2}}{b \sin \left (d x + c\right )^{3} + a} \,d x } \]
[In]
[Out]
Time = 14.46 (sec) , antiderivative size = 697, normalized size of antiderivative = 2.48 \[ \int \frac {\csc ^2(c+d x)}{a+b \sin ^3(c+d x)} \, dx=\frac {\left (\sum _{k=1}^6\ln \left (8192\,a^7\,b^6-{\mathrm {root}\left (729\,a^8\,b^2\,d^6-729\,a^{10}\,d^6-243\,a^6\,b^2\,d^4-b^4,d,k\right )}^2\,a^9\,b^6\,294912+{\mathrm {root}\left (729\,a^8\,b^2\,d^6-729\,a^{10}\,d^6-243\,a^6\,b^2\,d^4-b^4,d,k\right )}^3\,a^{11}\,b^5\,1548288-{\mathrm {root}\left (729\,a^8\,b^2\,d^6-729\,a^{10}\,d^6-243\,a^6\,b^2\,d^4-b^4,d,k\right )}^4\,a^{13}\,b^4\,1990656-{\mathrm {root}\left (729\,a^8\,b^2\,d^6-729\,a^{10}\,d^6-243\,a^6\,b^2\,d^4-b^4,d,k\right )}^5\,a^{13}\,b^5\,7962624+{\mathrm {root}\left (729\,a^8\,b^2\,d^6-729\,a^{10}\,d^6-243\,a^6\,b^2\,d^4-b^4,d,k\right )}^5\,a^{15}\,b^3\,5971968-65536\,a^6\,b^7\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )+\mathrm {root}\left (729\,a^8\,b^2\,d^6-729\,a^{10}\,d^6-243\,a^6\,b^2\,d^4-b^4,d,k\right )\,a^8\,b^6\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\,196608-{\mathrm {root}\left (729\,a^8\,b^2\,d^6-729\,a^{10}\,d^6-243\,a^6\,b^2\,d^4-b^4,d,k\right )}^2\,a^{10}\,b^5\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\,294912-{\mathrm {root}\left (729\,a^8\,b^2\,d^6-729\,a^{10}\,d^6-243\,a^6\,b^2\,d^4-b^4,d,k\right )}^3\,a^{10}\,b^6\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\,1769472+{\mathrm {root}\left (729\,a^8\,b^2\,d^6-729\,a^{10}\,d^6-243\,a^6\,b^2\,d^4-b^4,d,k\right )}^3\,a^{12}\,b^4\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\,221184-{\mathrm {root}\left (729\,a^8\,b^2\,d^6-729\,a^{10}\,d^6-243\,a^6\,b^2\,d^4-b^4,d,k\right )}^4\,a^{12}\,b^5\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\,2654208-{\mathrm {root}\left (729\,a^8\,b^2\,d^6-729\,a^{10}\,d^6-243\,a^6\,b^2\,d^4-b^4,d,k\right )}^5\,a^{14}\,b^4\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\,1990656\right )\,\mathrm {root}\left (729\,a^8\,b^2\,d^6-729\,a^{10}\,d^6-243\,a^6\,b^2\,d^4-b^4,d,k\right )\right )-\frac {1}{2\,a\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}+\frac {\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{2\,a}}{d} \]
[In]
[Out]